package spike.label;

import java.sql.SQLException;
import java.util.ArrayList;

import spike.db.QueryPool;

public class Label {
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		QueryPool query = new QueryPool();
		ArrayList array = new ArrayList();
		ArrayList temp = new ArrayList();
		ArrayList seqs = new ArrayList();		
		array = query.selectPosotiveWords();
		
		for (int i = 0; i < array.size(); i++) {
			System.out.println("The positive word = " + array.get(i));
			temp = query.search((String)array.get(i));
			query.positiveWordCount(temp.size(), (String)array.get(i));
			for (int j = 0; j < temp.size(); j++) {				
				seqs.add(temp.get(j));
			}			
		}
/*
		for (int i = 0; i < seqs.size(); i++) {
			query.putPS((String) seqs.get(i));
		}
		*/
		
		array = new ArrayList();
		seqs = new ArrayList();
		temp = new ArrayList();
		array = query.selectNegativeWords();

		for (int i = 0; i < array.size(); i++) {
			System.out.println("The negative word = " + array.get(i));
			temp = query.search((String)array.get(i));
			query.negativeWordCount(temp.size(), (String)array.get(i));
			for (int j = 0; j < temp.size(); j++) {
				seqs.add(temp.get(j));
			}
		}
	/*
		for (int i = 0; i < seqs.size(); i++) {
			query.putNG((String) seqs.get(i));
		}
	*/
	}
}
